export function timeFix() {
  const time = new Date()
  const hour = time.getHours()
  return hour < 9 ? '早上好' : (hour <= 11 ? '上午好' : (hour <= 13 ? '中午好' : (hour < 20 ? '下午好' : '晚上好')))
}

export function welcome() {
  // const arr = ['休息一会儿吧', '准备吃什么呢?', '要不要打一把 DOTA', '我猜你可能累了']
  // let index = Math.floor((Math.random()*arr.length))
  // return arr[index]
  return '欢迎来到蝙蝠娱乐管理后台！'
}

/**
 * 触发 window.resize
 */
export function triggerResize() {
  let event = document.createEvent('HTMLEvents')
  event.initEvent('resize', true, true)
  event.eventType = 'message'
  window.dispatchEvent(event)
}

export function isNumber(inputData) {
  if (parseFloat(inputData).toString() == "NaN") {
    return false;
  } else {
    return true;
  }
}
